package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

/**
 * @author 86188
 * @version v1.0
 * @project ShangTingApartment
 * @Date 2025/7/9 15:31
 * @company []
 * @description
 */
@Data
public class EnumException extends RuntimeException{
    private Integer code;

    public EnumException(String message,Integer code) {
        super(message);
        this.code = code;
    }
    public EnumException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code=resultCodeEnum.getCode();
    }
}
